package com.cloudfunx.common.exception;

/**
 * @author linjiayu
 * @date 2019-08-28
 */
public enum BizRetStatus {
    /**
     * 成功
     */
    SUCCESS(200, "成功"),

    /**
     * 业务失败
     */
    FAIL(1000, "失败"),

    /**
     * 错误
     */
    ERROR(500, "操作错误"),

    /**
     * 鉴权失败
     */
    TOKEN_ERROR(401, "Unauthorized"),

    /**
     * 登录鉴权失败
     */
    LOGIN_ERROR(203, "no login");

    //可扩展

    private Integer code;
    private String msg;

    BizRetStatus(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
